using System;
using System.Collections.Generic;
using System.Text;

using Open.Data.Persistence;


namespace Open.Data.Persistence.Testing
{
    [PrimaryKeys("OrderId, ProductId")]
    public class OrderItem: Table
    {
        private int _orderId;
        private int _productId;
        private int _quantity;

        [ForeignKey(typeof(Order))]
        public int OrderId
        {
            get 
            { 
                return _orderId; 
            }
            set
            { 
                _orderId = value;
            }
        }
   
        [ForeignKey(typeof(Product))]
        public int ProductId
        {
            get 
            { 
                return _productId; 
            }
            set 
            { 
                _productId = value;
            }
        }

        [Column]
        public virtual int Quantity
        {
            get 
            { 
                return _quantity; 
            }
            set
            { 
                _quantity = value; 
            }
        }
    }
}
